home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_shs_dlog_cistern.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  107 lines

  1. # Jones 3D Cog Script
  2. #
  3. # shs_Dlog_cistern.cog   Say the line, Indy.  
  4. #
  5. # [JWC]
  6. #
  7. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  8. #
  9. # ========================================================================================
  10.  
  11. symbols
  12.  
  13. message     startup
  14. message     entered
  15.  
  16. sound        in_cistern=Ss07j05.wav        local
  17. sound        in_spot=Ss07j07.wav            local
  18.      
  19. sector       trigger0    # standing in right spot
  20.  
  21. #thing        indy   
  22. thing        player            local
  23. #thing       cam1
  24. thing        statue
  25.  
  26. thing         interpcam
  27.  
  28. #int        curCam            local
  29. int            plantbulb=104     local
  30. int            spoken=0        local # becomes 1 after 1st line, 2 after second 
  31. int            triggered=0        local  
  32. end
  33.  
  34. # ========================================================================================
  35.  
  36. code
  37.  
  38. startup:
  39.     
  40.           
  41.     player = GetLocalPlayerThing();
  42.     return;
  43.  
  44.  
  45. entered:
  46.     
  47.     if ((GetSenderRef() == trigger0) && (spoken == 0)) 
  48.     {
  49.         if(IsThingVisible(statue) != 1) return;    # makes sure Indy is looking in right direction
  50.  
  51.         MakeMeStop();
  52.         StartCutscene(1);
  53.         
  54.         # Camera stuff
  55.         SetExtCamOffsetToThing(interpCam);
  56.         sleep(.5);
  57.         
  58.         # "Some kind of cistern here..."
  59.         PlayVoice(player, in_cistern, 1.0, 1);
  60.         sleep(.3);
  61.         spoken=1;
  62.             
  63.         # check if have bulb
  64.         if(GetInv(player, plantbulb) == 1)
  65.         {
  66.             
  67.             # "...just the spot to water that bulb."
  68.             PlayVoice(player, in_spot, 1.0, 1);
  69.             spoken=2;
  70.         }
  71.         
  72.         RestoreExtCam();
  73.         ClearActorFlags(player, 0x200000); # player in control
  74.         EndCutscene();
  75.         return;
  76.     }
  77.     
  78.     # Handles subsequent visit
  79.     if ((GetSenderRef() == trigger0) && (spoken == 1))
  80.     {
  81.         if(IsThingVisible(statue) != 1) return;
  82.         
  83.         if(GetInv(player, plantbulb) != 1) return;    # bail if no bulb
  84.         
  85.         MakeMeStop();
  86.         StartCutscene(1);
  87.         
  88.         # Camera stuff
  89.         SetExtCamOffsetToThing(interpCam);
  90.         sleep(.5);
  91.         
  92.         # "...just the spot to water that bulb."
  93.         PlayVoice(player, in_spot, 1.0, 1);
  94.         spoken=2;
  95.         
  96.         RestoreExtCam();
  97.         ClearActorFlags(player, 0x200000); # player in control
  98.         EndCutscene();
  99.     }
  100.  
  101. return;
  102.      
  103.   
  104.  
  105. end
  106.  
  107.